﻿using System;
using System.IO;

namespace CodeStandardAddin.Control
{
	public static class CommonUtils
	{
		/// <summary>
		/// Create stream from text.
		/// </summary>
		/// <param name="text">Data of stream</param>
		public static Stream ReadResourceStream(string text)
		{
			Stream result = new MemoryStream();
			StreamWriter streamWriter = new StreamWriter(result);
			streamWriter.Write(text);
			streamWriter.Flush();
			result.Position = 0;
			return result;
		}
	}
}